import 'dart:async';

import 'package:built_collection/built_collection.dart';

abstract class LexicalItemImageCachingService {
  int get cacheSizeInBytes;

  Stream<int> get cacheSizeInBytesStream;

  BuiltMap<String, String> get cachedImagePathMap;

  Stream<BuiltMap<String, String>> get cachedImagePathMapStream;

  BuiltSet<String> get downloadTaskIds;

  Stream<BuiltSet<String>> get downloadTaskIdStream;

  Future<void> initialize();

  void dispose();

  void addDownloadTask({
    required BuiltSet<String> imageIds,
    required String taskId,
  });

  void stopDownloadTask({
    required String taskId,
  });

  void downloadImage(String imageId);

  void clearCache();
}
